/// <reference path="../types/global.d.ts" />
export default function createBuildChunks(viteEnv: ViteEnv, isBuild = false) {
    const isProdEnv = viteEnv.VITE_CURRENT_MODE === 'prod';
    const manualChunks: Record<string, string[]> = {
        reactLib: ['react', 'react-router'],
        // ant: ['ant'],
        mobx: ['mobx'],
        // ant无法分包
        // antd: ['antd'],
    };
    if (isBuild && !isProdEnv) {
        Reflect.deleteProperty(manualChunks, 'console');
    }

    return {
        manualChunks,
    };
}
